package com.sxjh.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 物料表
 * </p>
 *
 * @author zixin
 * @since 2021-07-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("materials")
@ApiModel(value="Materials对象", description="物料表")
public class Materials implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "物料分类ID")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty(value = "物料名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "品名")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "物料大类编码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "规格")
    @TableField("specification")
    private String specification;

    @ApiModelProperty(value = "是否需要质检")
    @TableField("is_quality_testing")
    private Integer isQualityTesting;

    @ApiModelProperty(value = "每吨运输费用")
    @TableField("freight")
    private BigDecimal freight;

    @ApiModelProperty(value = "每件重量，单位吨。只适用于按件计量物料")
    @TableField("net_weight")
    private BigDecimal netWeight;

    @ApiModelProperty(value = "税率")
    @TableField("tax_rate")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "是否固定结算价")
    @TableField("fixed_settlement_price")
    private Integer fixedSettlementPrice;

    @ApiModelProperty(value = "结算计量方式，0=》默认方式，1=》实收，2=》原发，3=》可实收可原发")
    @TableField("formula_mode")
    private Integer formulaMode;

    @ApiModelProperty(value = "每吨包装物重量")
    @TableField("package_wegiht")
    private BigDecimal packageWegiht;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    private LocalDateTime deletedAt;

}
